package com.winshare.saleAssistant.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.winshare.saleAssistant.domain.dto.req.PageQueryDTO;
import com.winshare.saleAssistant.domain.dto.req.UserQueryDTO;
import com.winshare.saleAssistant.model.TUser;
import com.winshare.saleAssistant.modelVo.LoginCountVo;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户基础信息 服务类
 * </p>
 *
 * @author stylefeng
 * @since 2020-11-09
 */
public interface ITUserService extends IService<TUser> {

    List<TUser> selectUser();

    com.winshare.saleAssistant.util.Page<TUser> selectByCondition(UserQueryDTO userQueryDTO);

    com.winshare.saleAssistant.util.Page<Map<String, Object>> getNotMatchUserByPage(PageQueryDTO pageQueryDTO);

    Integer updateUserSchoolCode(String SchoolName, String SchoolCode);

    Integer getTUserCount(Date starTime, Date endTime, String productName);

    // 账号总数/激活数/激活概率
    List<TUser> getActivationTotal(String areaName, String productName, Date starTime, Date endTime);

    List<TUser> getLoginTotal(String areaName, String productName, Date starTime, Date endTime);

    //用户激活总数
    int getAccountTotal(String areaName, String productName, Date starTime, Date endTime);

    List<LoginCountVo> getSexProportion(String provinceName, String cityName, String areaName, String productName, Date starTime, Date endTime);

    List<TUser> getSubjectCount(String provinceName, String cityName, String areaName, String productName, Date starTime, Date endTime);

    List<TUser> getLearSectionCount(String provinceName, String cityName, String areaName, String productName, Date starTime, Date endTime);

    List<TUser> getUserCountTime(String orderBy, String schoolName, String provinceName, String cityName, String areaName, String productName, Date starTime, Date endTime);

    Map<String, Object> getPopAge(String provinceName, String cityName, String areaName, String productName, Date starTime, Date endTime);

    String getSynchronousTime();
}
